package com.lrs.java.j2se_self.collectionReview;
import java.util.*;
public class ReviewMap {
	public static void main(String[] args){
		Map<String,Integer> m1 = new HashMap<String,Integer>();
		Map<String,String> m2 = new TreeMap<String,String>();
		//m1.put("one", new Integer(100));
		m1.put("one",100);
		//m1.put("two", new Integer(200));
		m1.put("two",200);
		//m1.put("three", new Integer(300));
		m1.put("three",300);
		m2.put("A", "very good");
		m2.put("B", "good");
		m2.put("C", "bad");
		System.out.println(m1.containsKey("one"));
		System.out.println("m1 contains four "+m1.containsKey("four"));
		System.out.println(m1.containsValue(100));
		System.out.println(m2.containsValue("very good"));
		int s1=0;
		if(m1.containsKey("one"))
		//s1 = ((Integer)m1.get("one")).intValue();
			s1 = m1.get("one");
		String s2;
		s2 = m2.get("A");
		System.out.println(s1);
		System.out.println(m1);
		
		Map m3 = new HashMap(m1);
		m3.putAll(m2);
		System.out.println(m3);
	}
}
